import {
	observer
} from 'mobx-react';
import {
	WeaButtonIcon
} from 'ecCom';

@observer
export default class ButtonIcons extends React.Component {
	constructor(props) {
		super(props);
	}

	render() {
		const {
			buttonIcons,
			disabled,
		} = this.props;

		return (
			<div className='buttonIcons'>
				{
					buttonIcons.map((item, index) => {
						const {
							buttonType
						} = item;

						if(buttonType === 'del'){
							return <WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@1rhbu4@${index}`} {...item} disabled={disabled}/>
						}else{
							return <WeaButtonIcon ecId={`${this && this.props && this.props.ecId || ''}_WeaButtonIcon@i7cvsg@${index}`} {...item} />
						}
					})
				}
			</div>
		);
	}
}